package Week6.J0520;

import java.util.Scanner;

public class 春游_xv {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        while (t-- != 0) {
            int n = scanner.nextInt(), a = scanner.nextInt(), b = scanner.nextInt();
            // a -> 双人船, b -> 三人船
            int sum = 0;
            if (n <= 2) {
                sum += Math.min(a, b);
            } else {
                if (a * 3 < b * 2) {
                    sum += n / 2 * a;
                    n %= 2;
                    if (n == 1) {
                        sum += Math.min(a, b - a);// <- Math.min(Math.min(a, b), b - a)
                    }
                } else {
                    sum += n / 3 * b;
                    n %= 3;
                    if (n == 1) {
                        sum += Math.min(Math.min(a, b), 2 * a - b);
                    } else if (n == 2) {
                        sum += Math.min(Math.min(a, b), 3 * a - b);
                    }
                }
            }
            System.out.println(sum);
        }
    }
}
